package com.design.pattern.iterator;

import java.util.ArrayList;
import java.util.Iterator;

@Deprecated
public class PancakeHouseIterator implements Iterator {
    ArrayList menuItems;
    int position = 0;

    public PancakeHouseIterator(ArrayList menuItems) {
        this.menuItems = menuItems;
    }

    public boolean hasNext() {
        return position != menuItems.size();
    }

    public Object next() {
        return menuItems.get(position++);
    }

    public void remove() {

    }
}